package net.tavion.angelboot.common.utils;

import net.tavion.angelboot.common.enums.SystemCode;
import net.tavion.angelboot.common.vo.GenericResponse;

public class FrameworkUtils {

    public static <T extends GenericResponse> boolean notCallSuccess(T apiResponse){
        return !isCallSuccess(apiResponse);
    }

    public static <T extends GenericResponse> boolean isCallSuccess(T apiResponse){
        return  apiResponse!=null && apiResponse.getCode()!=null && apiResponse.getCode().endsWith(SystemCode.SUCCESS.getCode());
    }
}
